package ar.edu.sovietrussia.customcomponents.util;

import org.apache.wicket.Component;
import org.apache.wicket.markup.html.panel.EmptyPanel;
import org.apache.wicket.markup.html.panel.Panel;

/**
 */
public class WrapperPanel extends Panel {

    private static final long serialVersionUID = 3361007988399428855L;

    public static final String INTERNALID = "content";

    public WrapperPanel(final String id) {
        super(id);
        this.add(new EmptyPanel(INTERNALID));
    }

    public WrapperPanel(final String id, final Component component) {
        super(id);
        this.add(component);
    }

    public void replaceContent(final Component component) {
        this.get(INTERNALID).replaceWith(component);
        // this.replace(component);
    }

}
